import request from '@/utils/request'

// 获取菜单数据的接口
// /admin/acl/permission
export const reqMenuList = () => request.get('/admin/acl/permission')

// 获取添加菜单|功能的接口
// /admin/acl/permission/save method: post
export const reqAddMenuOrFeature = (data) => {
    return request({
        url: '/admin/acl/permission/save',
        method: 'post',
        data,
    })
}

// 获取修改菜单|功能的接口
export const reqUpdateMenuOrFrature = (data) => {
    return request({
        url: '/admin/acl/permission/update',
        method: 'put',
        data,
    })
}

// 获取删除菜单|功能的接口
// /admin/acl/permission/remove/{id}
export const reqRemoveMenuOrFeature = (id) => {
    return request({
        url: `/admin/acl/permission/remove/${id}`,
        method: 'delete'
    })
}